projects
/
emacs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a62a057
)
(sh-mode): Do not fail if buffer has no
author
Karl Heuer
<kwzh@gnu.org>
Sat, 15 May 1999 05:57:39 +0000
(
05:57
+0000)
committer
Karl Heuer
<kwzh@gnu.org>
Sat, 15 May 1999 05:57:39 +0000
(
05:57
+0000)
magic number and is not associated with a file.
lisp/progmodes/sh-script.el
patch
|
blob
|
history
diff --git
a/lisp/progmodes/sh-script.el
b/lisp/progmodes/sh-script.el
index 22dae00d40c02817f9a1ed5a477a00dab65a63c6..44d70931f66f6e7601b6df32e6a102b87be5f198 100644
(file)
--- a/
lisp/progmodes/sh-script.el
+++ b/
lisp/progmodes/sh-script.el
@@
-774,8
+774,9
@@
with your script for an edit-interpret-debug cycle."
(save-excursion
(goto-char (point-min))
(cond ((looking-at "#![ \t]?\\([^ \t\n]*/bin/env[ \t]\\)?\\([^ \t\n]+\\)")
- (match-string 2))
- ((string-match "\\.m?spec$" buffer-file-name)
+ (match-string 2))
+ ((and buffer-file-name
+ (string-match "\\.m?spec$" buffer-file-name))
"rpm")))))
(if interpreter
(sh-set-shell interpreter nil nil)